package com.sh.suhe.utildemos.utils;

import com.google.gson.Gson;

import org.apache.poi.ss.formula.functions.T;

public class JsonUtil {

    public static String object2Json(Object obj){
        Gson gson = new Gson();
        return gson.toJson(obj);
    }
    public static <T>T json2Object(String json, Class<T> obj){
        Gson gson = new Gson();
        return gson.fromJson(json,obj);
    }
}
